package com.example.sticker;

public class Util {
	public static int getScreenHeight() {
		return StickerApplication.getContext().getResources().getDisplayMetrics().heightPixels;
	}
	
	public static int getScreenWidth() {
		return StickerApplication.getContext().getResources().getDisplayMetrics().widthPixels;
	}
	
	public static int dpToPixel(float dp) {
		return (int)(0.5F + dp * StickerApplication.getContext().getResources().getDisplayMetrics().density);
	}
	
	public static int pixelToDp(float pix) {
		return (int)(0.5F + pix / StickerApplication.getContext().getResources().getDisplayMetrics().density);
	}
}